package com.example.k8s.hello.service.sys.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.example.k8s.hello.bean.sys.query.SysLogQuery;
import com.example.k8s.hello.service.sys.service.SysLogService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import com.example.k8s.hello.common.bean.Page;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * 系统日志
 *
 * @author Mark sunlightcs@gmail.com
 */
@Tag(name = "系统日志")
@Controller
@RequestMapping("/sys/log")
@RequiredArgsConstructor
public class SysLogController {
	private final SysLogService sysLogService;
	
	/**
	 * 日志分页
	 */
	@Operation(summary = "日志分页")
	@ResponseBody
	@GetMapping("/list")
	@SaCheckPermission("sys:log:list")
	public Page list(@ParameterObject SysLogQuery query, @ParameterObject Page page){
		return sysLogService.queryPage(query, page);
	}
	
}
